﻿<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" CodeBehind="PartyRepresentativeStudioEdit.aspx.cs" Inherits="ZHDJ.BranchCenter.Module.PartyRepresentative.PartyRepresentativeStudioEdit" %>


<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>
    <style>
        .fontred {
            color: red;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" style="background-color: #0000FF" onsubmit="return UESync();">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
        <f:Panel ID="Panel1" ShowBorder="false" ShowHeader="false" AutoScroll="true" runat="server">
            <Items>
                <f:TabStrip ID="TabStrip1" ShowBorder="false" TabPosition="Top" AutoScroll="false"
                    EnableTabCloseMenu="false" ActiveTabIndex="0" Margin="0 auto" BodyPadding="2px"
                    runat="server">
                    <Tabs>
                        <f:Tab Title="基础信息" BodyPadding="5px" Layout="VBox"
                            runat="server">
                            <Items>
                                <f:Form BodyPadding="10px" ID="Form2"
                                    runat="server" Title="" ShowBorder="false" ShowHeader="false">
                                    <Rows>
                                        <f:FormRow>
                                            <Items>
                                                <f:DropDownList ID="ddlCategory" AutoPostBack="true" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged" EmptyText="==请选择==" LabelAlign="right" runat="server" Label="类型" Required="true" ShowRedStar="true" RequiredMessage="请选择类型">
                                                    <f:ListItem Value="1" Text="组织" />
                                                    <f:ListItem Value="2" Text="个人" />
                                                </f:DropDownList>
                                                 <f:TextBox Hidden="true" ID="TextBox1" runat="server" LabelAlign="right" >
                                                </f:TextBox>


                                            </Items>

                                        </f:FormRow>

                                        <f:FormRow runat="server" ID="frppBranch" >
                                            <Items>
                                                <f:TriggerBoxPicker Label="所属组织" LabelAlign="right" Width="180px"
                                                    runat="server" ID="ppBranch" ShowTrigger1="true" ShowTrigger2="true" Trigger1Icon="Clear"
                                                    EnableEdit="false" WindinsTitle="选择所属组织" Required="true" ShowRedStar="true"
                                                    WindinsHeight="450px" EnableTrigger1PostBack="false" EnableTrigger2PostBack="false"
                                                    WindinsWidth="700px" WindinsUrl="../../../Share/Picker/BranchSinglePicker.aspx">
                                                </f:TriggerBoxPicker>
                                            </Items>
                                        </f:FormRow>
                                        <f:FormRow  runat="server" ID="frppMember" Hidden="true">
                                            <Items>
                                                <f:TriggerBoxPicker Label="所属个人" LabelAlign="right" Width="180px" 
                                                    runat="server" ID="ppMember" ShowTrigger1="true" ShowTrigger2="true" Trigger1Icon="Clear"
                                                    EnableEdit="false" WindinsTitle="选择所属个人" Required="true" ShowRedStar="true"
                                                    WindinsHeight="450px" EnableTrigger1PostBack="false" EnableTrigger2PostBack="false"
                                                    WindinsWidth="700px" WindinsUrl="../../../Share/Picker/MemberSinglePicker.aspx">
                                                </f:TriggerBoxPicker>
                                            </Items>

                                        </f:FormRow>
                                        <f:FormRow>
                                            <Items>
                                                <f:TextBox ID="txtStudioName" runat="server" LabelAlign="right" Label="工作室名称" Required="true" ShowRedStar="true" RequiredMessage="请填写工作室名称">
                                                </f:TextBox>

                                            </Items>

                                        </f:FormRow>
                                        <f:FormRow>
                                            <Items>
                                                <f:TextBox ID="txtStudioPhone" runat="server" LabelAlign="right" Label="工作室电话" Required="true" ShowRedStar="true" RequiredMessage="请填写工作室电话">
                                                </f:TextBox>

                                            </Items>

                                        </f:FormRow>
                                        <f:FormRow>
                                            <Items>
                                                <f:TextBox ID="txtLinkMan" runat="server" LabelAlign="right" Label="联络员" Required="true" ShowRedStar="true" RequiredMessage="请填写联络员">
                                                </f:TextBox>
                                                <f:TextBox ID="txtLinkPhone" runat="server" LabelAlign="right" Label="联系电话" Required="true" ShowRedStar="true" RequiredMessage="请填写联系电话">
                                                </f:TextBox>
                                            </Items>

                                        </f:FormRow>
                                        <f:FormRow>
                                            <Items>
                                                <f:CheckBox ID="cbxEnabled" runat="server" Label="是否发布" LabelAlign="right">
                                                </f:CheckBox>
                                            </Items>
                                        </f:FormRow>
                                        <f:FormRow>
                                            <Items>
                                                <f:ContentPanel ID="ContentPanel1" runat="server" ShowBorder="false" ShowHeader="false">
                                                    <script type="text/plain" id="editor"></script>
                                                </f:ContentPanel>
                                            </Items>
                                        </f:FormRow>



                                    </Rows>
                                </f:Form>

                            </Items>
                        </f:Tab>
                        <f:Tab Title="工作室图片设置" BodyPadding="5px" runat="server" Layout="VBox">
                            <Items>

                                <f:Panel ID="Panel33" ShowBorder="false" ShowHeader="false" runat="server" Layout="VBox" BoxConfigAlign="Center"
                                    BoxConfigPosition="Center" BoxConfigChildMargin="0 0 5 0" BodyPadding="5">
                                    <Toolbars>
                                        <f:Toolbar ID="Toolbar4" runat="server" Position="Top" ToolbarAlign="Center">
                                            <Items>
                                                <f:FileUpload runat="server" ID="filePhoto" ShowRedStar="false"
                                                    ButtonText="上传图片" ButtonOnly="true" Required="false" ButtonIcon="ImageAdd"
                                                    AutoPostBack="true" OnFileSelected="filePhoto_FileSelected">
                                                </f:FileUpload>
                                            </Items>
                                        </f:Toolbar>
                                    </Toolbars>
                                    <Items>
                                        <f:Panel ID="Panel2" BoxFlex="1" MinHeight="300px" Margin="0"
                                            runat="server" BodyPadding="5px" ShowBorder="false" ShowHeader="false">
                                            <Items>
                                                <f:Image ID="imgPhoto" ImageUrl="~/Content/icon/blank1.png" Width="300px" runat="server">
                                                </f:Image>
                                            </Items>
                                        </f:Panel>
                                    </Items>
                                </f:Panel>
                                <f:HiddenField Text="" ID="hdFileId" runat="server"></f:HiddenField>
                            </Items>
                        </f:Tab>
                    </Tabs>
                </f:TabStrip>
            </Items>
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server" Position="Bottom" ToolbarAlign="Center">
                    <Items>
                        <f:Button ID="btnSaveClose" ValidateForms="Form2" Icon="SystemSaveClose"
                            OnClick="btnSaveClose_Click" runat="server" Text="保存并关闭">
                        </f:Button>
                        <f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
                        </f:ToolbarSeparator>
                        <f:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                            Text="关闭" DisableControlBeforePostBack="True">
                        </f:Button>
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Panel>


    </form>
</body>
</html>

<script src="../../../../Resource/ueditor/ueditor.config.js"></script>
<script src="../../../../Resource/ueditor/ueditor.all.min.js"></script>

<script>
    var editor;
    var editorContent = '<%=EditorContent%>';
    var containerClientID = '<%= ContentPanel1.ClientID %>';
    F.ready(function () {


        editor = UE.getEditor("editor", {
            initialFrameWidth: '100%',
            initialFrameHeight: '180',
            enableAutoSave: false,
            saveInterval: 1000000,
            elementPathEnabled: false,
            autoHeightEnabled: false,
            onready: function () {
                // 重新布局外部容器
                F(containerClientID).updateLayout();
            }
        });

        editor.ready(function () {
            if (editorContent) {
                editor.setContent(editorContent);
            }
        });
    });


    function ReDoLayout() {

        var panel1ClientID = '<%= Panel33.ClientID %>';

        F.ready(function () {

            window.setTimeout(function () {

                F(panel1ClientID).doLayout();
            }, 100);

        });
    }

    function UESync() {
        var editor = UE.getEditor('editor')
        editor.sync();
        return true;
    }

    ReDoLayout();
</script>
